waypt_write_cb(GPS_PWay *way)
{
static int i;
+ int n = waypt_count();
if (global_opts.verbose_status) {
- fprintf(stdout, "%d\r", ++i*100/waypt_count());
+ i++;
+ fprintf(stdout, "%d/%d/%d\r", i*100/n, i, n);
fflush(stdout);
}
return 0;
* we'll be fairly persistent in retrying.
*/
if (retrycnt--) {
- warning( "%d\n", retrycnt);
goto retry;
} else {
fatal(MYNAME ": No data received from GPS.\n");
QUEUE_FOR_EACH(&waypt_head, elem, tmp) {
waypointp = (waypoint *) elem;
if (global_opts.verbose_status) {
- fprintf(stdout, "%d\r", ++i*100/waypt_ct);
+ i++;
+ fprintf(stdout, "%d/%d/%d\r", i*100/waypt_ct, i, waypt_ct);
fflush(stdout);
}
(*cb) (waypointp);